#!/bin/bash

service v2ray stop

# 设置 http/https 代理
# 10809 是v2ray 常用代理端口
proxy_ip=127.0.0.1:10808

#export http_proxy=http://$proxy_ip
#export https_proxy=http://$proxy_ip

# 取消 http/https 代理
unset  http_proxy
unset  https_proxy


# 设置 git 代理 socks5
#git config --global http.proxy socks5://$proxy_ip
#git config --global https.proxy socks5://$proxy_ip

# 设置 git 代理 http
#git config --global http.proxy http://$proxy_ip
#git config --global https.proxy https://$proxy_ip

# 取消 git 代理
git config --global --unset http.proxy
git config --global --unset https.proxy

echo "check proxy is or not disable"
echo `env | grep "proxy"`
